home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group99a.txt / 000235_icon-group-sender _Thu Nov 18 08:18:01 1999.msg < prev    next >
Internet Message Format  |  2000-09-20  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id IAA27016
  4.     for icon-group-addresses; Thu, 18 Nov 1999 08:17:41 -0700 (MST)
  5. Message-Id: <199911181517.IAA27016@baskerville.CS.Arizona.EDU>
  6. From: Chris.D.Tenaglia@jci.com
  7. Subject: Re: Strange table behavior
  8. To: Kostas Oikonomou <oikonomou@att.com>
  9. Cc: icon-group@optima.CS.Arizona.EDU
  10. Date: Thu, 18 Nov 1999 08:25:52 -0600
  11. X-Priority: 3 (Normal)
  12. X-MIMETrack: Serialize by Router on jwimkrs1.na.jci.com/NA/Johnson_Controls(Release 5.0.1a
  13.  (Intl)|17 August 1999) at 11/18/99 08:29:31 AM
  14. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  15. Status: RO
  16.  
  17.  
  18. T is a table. The default value is an empty list.
  19. T[1] is a table entry with the value A
  20. *T does not reference a specific entry, so it picks
  21. the default empty list, returning 0 for it's length.
  22. *T[1] would return 1
  23.  
  24. Chris Tenaglia.
  25.  
  26.  
  27.  
  28.  
  29.  
  30. Kostas Oikonomou <oikonomou@att.com> on 11/17/99 04:48:20 PM
  31.  
  32. To:   icon-group@optima.CS.Arizona.EDU
  33. cc:
  34.  
  35. Subject:  Strange table behavior
  36.  
  37.  
  38. When I run this program
  39.  
  40. procedure main()
  41.   local T
  42.   T := table([])
  43.   put(T[1], "A")
  44.   write("*T = ", *T)
  45.   write(T[1][1])
  46. end
  47.  
  48. I get
  49.  
  50. *T = 0
  51. A
  52.  
  53.  
  54. Can anyone explain to me what's happening here?  Does it have to do with
  55. T being a table of lists?
  56.  
  57.                     Kostas
  58.  
  59.  
  60.  
  61.  
  62.  
  63.